/**
 *Copyright (c) 2024 watereyes
 * safetymanagement is licensed under Mulan PubL v2.
 * You can use this software according to the terms and conditions of the Mulan
 * PubL v2.
 * You may obtain a copy of Mulan PubL v2 at:
 *          http://license.coscl.org.cn/MulanPubL-2.0
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PubL v2 for more details.
 */
package com.koron.purpose.mapper;

import com.koron.purpose.bean.IndexTemplateConfigBean;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface IndexTemplateConfigMapper {
    /**
     * 根据条件查询 指标模版配置
     * @param map
     * @return
     */
    List<Map> queryForList(Map map);

    /**
     * 根据条件统计 指标模版配置
     * @param map
     * @return
     */
    Integer countQueryForList(Map map);

    /**
     * 根据 id 查询 指标模版配置
     * @param id
     * @return
     */
    Map queryById(String id);

    /**
     * 根据id 删除 指标模版配置
     * @param id
     * @return
     */
    Integer deleteIndexTemplateConfig(String id);

    /**
     * 根据指标模版id 删除 指标模版配置管理表记录
     * @param indexTemplateConfigId 指标模版id
     * @return
     */
    Integer deleteIndexConfigKpi(String indexTemplateConfigId);

    /**
     * 根据指标模版id 查询 指标模版配置管理记录
     * @param indexTemplateConfigId 指标模版id
     * @return
     */
    List<Map<String, Object>> queryIndexConfigKpis(String indexTemplateConfigId);

    /**
     * 新增 指标模版配置
     * @param bean
     * @return
     */
    Integer insertIndexTemplateConfig(IndexTemplateConfigBean bean);

    /**
     * 批量新增 指标模版配置管理表
     * @param indexConfigKpis
     * @return
     */
    Integer insertBatchIndexConfigKpi(@Param("indexConfigKpis") List<Map> indexConfigKpis);

    /**
     * 修改 指标模版配置
     * @param bean
     * @return
     */
    Integer updateIndexTemplateConfig(IndexTemplateConfigBean bean);
}
